import Http from "../http";

export function uploadApi(params:any) {
    return Http.post('user/upload_img', params)
}


export function basicInfoApi() {
    return Http.get('user/basic_info')
}

export function changeBasicInfoApi(params:any) {
    return Http.post('user/change_basic_info', params)
}

export function safetySettingApi(params:any) {
    return Http.post('user/safety_setting', params)
}

export async function messageApi() {
    const { data} = await Http.get('user/message/detail')
    return data
}


export async function msgCountApi() {
    const { data} = await Http.get('user/message/unread')
    return data.count
}

export async function msgDetailApi(id:number) {
    const { data} = await Http.post('user/message/click', { message_id : id})
    return data[0].content
}